home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / error_hn / ora110 / oracle.txt < prev    next >
Encoding:
Text File  |  1994-03-07  |  14.8 KB  |  362 lines

  1. UPD: Oracle ODBC Setup and Connection Issues                  
  2.  
  3. ---------------------------------------------------------------------
  4. The information in this article applies to:
  5.  
  6. - Professional Edition of Microsoft Visual Basic for Windows, version 3.0
  7. ---------------------------------------------------------------------
  8.  
  9. SUMMARY
  10. =======
  11.  
  12. The information given further below was taken from the latest version
  13. of the ORACLE.TXT file. A version of ORACLE.TXT was provided with Visual
  14. Basic version 3.0, but a later version (the one shown below) was provided
  15. with Microsoft Access version 1.1 for Windows. This updated version is
  16. provided in the More Information section below.
  17.  
  18. To install the earlier version of ORACLE.TXT on your computer, run Data
  19. Access Setup and install the Oracle ODBC driver. The ORACLE.TXT file will
  20. be installed in your WINDOWS\SYSTEM directory. Then you can update the
  21. file with the new information provided in the More Information section
  22. below.
  23.  
  24. The ORACLE.TXT file fails to mention that the SQL*NET drivers are not
  25. provided with Visual Basic. In order to use the information in this
  26. article, you must acquire the SQL*NET drivers from Oracle. You can
  27. contact Oracle at 1-800-345-DBMS.
  28.  
  29. MORE INFORMATION
  30. ================
  31.  
  32. SETTING UP THE ODBC ORACLE DRIVER FOR USE WITH THE SQL*NET FOR WINDOWS DLLs
  33.  
  34. This file discusses how to set up the ODBC ORACLE driver to run with your
  35. ORACLE Server software. To use the ODBC ORACLE driver with any large
  36. application, such as Microsoft Access, you must use the SQL*Net for Windows
  37. DLLs. Because the ODBC ORACLE driver is designed to use ORACLE Server
  38. version 6 and the SQL*Net for Windows DLLs are designed to use ORACLE
  39. Server version 7, you must be careful to configure your system correctly.
  40.  
  41. If you do not have the SQL*Net for Windows DLLs, or, after following the
  42. instructions in this file, you are still unable to connect to ORACLE Server
  43. with SQL*Net, you can contact Oracle Corp. at 1-800-345-DBMS.
  44.  
  45. If ORACLE Server version 6 is already installed on your system
  46. --------------------------------------------------------------
  47.  
  48. To set up the ODBC ORACLE driver and the SQL*Net for Windows DLLs if you
  49. already have ORACLE Server version 6 on your system:
  50.  
  51. 1.  Make sure you have the correct versions of ORACLE products, including
  52.     at least one SQL*Net protocol.
  53.  
  54.     Product                                  Version
  55.     --------------------------------         -----------
  56.     ORACLE Installer                         3.0.8.3.7
  57.     Required Support Files                   7.0.12.1.0
  58.     SQL*Net Named Pipes for Windows          1.1.1.3
  59.     SQL*Net SPX for Windows                  1.1.1.5
  60.     SQL*Net TCP/IP for Windows               1.1.7.6
  61.  
  62. 2.  Test your current SQL*Net connection by using an ORACLE tool such as
  63.     SQL*Plus for Windows.
  64.  
  65. 3.  Search for and delete all copies of ORA6WIN.DLL from your system. A new
  66.     (backwards compatible) version of ORA6WIN.DLL will be installed with
  67.     the ODBC ORACLE driver.
  68.  
  69. 4.  Run the ORACLE Installer program. When asked for your ORACLE
  70.     installation directory, use the suggested default directory C:\ORAWIN.
  71.  
  72. 5.  Run the ORACLE Installer in the ORACLE group in the Program Manager:
  73.  
  74.     a) Install the files from the Required Support Files disk.
  75.  
  76.     b) Install the SQL*Net protocol you will be using. For more
  77.        information, see the ORACLE documentation.
  78.  
  79. 6.  If the following line exists, remove it from your AUTOEXEC.BAT file:
  80.  
  81.       SET CONFIG=<oracle_configuration_file>
  82.  
  83.     Add the following line to your AUTOEXEC.BAT file:
  84.  
  85.       SET CONFIG_FILES=C:\WINDOWS\ORACLE.INI
  86.  
  87.     NOTE: If you are using the MS-DOS 6.0 operating system, add the
  88.     following line to the end of your AUTOEXEC.BAT file:
  89.  
  90.       SET CONFIG=
  91.  
  92.     ORACLE Server first checks the CONFIG environment variable for the path
  93.     of the ORACLE configuration file. If the CONFIG variable is not set,
  94.     ORACLE Server checks the CONFIG_FILES variable. Because MS-DOS 6.0 can
  95.     use the CONFIG environment variable during system startup, you must
  96.     clear this variable before leaving your AUTOEXEC.BAT file. Otherwise,
  97.     ORACLE Server will use its value as the path of the ORACLE
  98.     configuration file.
  99.  
  100. 7.  Make sure your PATH variable includes the BIN subdirectories of your
  101.     <oraclehome> directory and the \ORAWIN directory. For example, if your
  102.     <oraclehome> directory is C:\ORACLE6, add the following line to your
  103.     AUTOEXEC.BAT file:
  104.  
  105.       SET PATH=%PATH%;C:\ORACLE6\BIN;C:\ORAWIN\BIN
  106.  
  107. 8.  Paste the contents of your CONFIG.ORA file at the start of your
  108.     ORACLE.INI file. For example, if your CONFIG.ORA file contains:
  109.  
  110.       LANGUAGE=American_America.US7ASCII
  111.       ORACLE_HOME=C:\ORACLE6
  112.       MACHINE_TYPE=J
  113.       SQLPATH=C:\ORACLE6
  114.       WIN_REMOTE_SESSIONS=3
  115.       LOCAL=p:MyServer
  116.  
  117.     and your ORACLE.INI file contains:
  118.  
  119.       [Oracle]
  120.       ORACLE_HOME=C:\ORAWIN
  121.       LANGUAGE=American_America.US7ASCII
  122.       NLS_LANG=ENGLISH
  123.       WIN_LOCAL_SESSIONS=1
  124.       TCP_VENDOR=LANMAN
  125.       TCP_SERVICES_FILE=C:\WINDOWS\SERVICES
  126.  
  127.     then your modified ORACLE.INI file should contain:
  128.  
  129.       LANGUAGE=American_America.US7ASCII
  130.       ORACLE_HOME=C:\ORACLE6
  131.       MACHINE_TYPE=J
  132.       SQLPATH=C:\ORACLE6
  133.       WIN_REMOTE_SESSIONS=3
  134.       LOCAL=p:MyServer
  135.  
  136.       [Oracle]
  137.       ORACLE_HOME=C:\ORAWIN
  138.       LANGUAGE=American_America.US7ASCII
  139.       NLS_LANG=ENGLISH
  140.       WIN_LOCAL_SESSIONS=1
  141.       TCP_VENDOR=LANMAN
  142.       TCP_SERVICES_FILE=C:\WINDOWS\SERVICES
  143.  
  144.     Note that the ORACLE_HOME variable is set twice, once to point to the
  145.     version 6 <oraclehome> directory and once to point to C:\ORAWIN.
  146.  
  147. 9.  If it is not already running, start Windows. Insert the ODBC Setup disk
  148.     in drive A, choose Run from the Windows Program Manager (or File
  149.     Manager) File menu, and then type "a:\setup.exe" in the Command Line
  150.     box. For information about using the ODBC Setup program, see the online
  151.     Help.
  152.  
  153. 10. Run the ODBC Control Panel option and add a data source for your ORACLE
  154.     server. For information about using the ODBC Control Panel option, see
  155.     the online Help.
  156.  
  157. You should now be able to run the ODBC ORACLE driver. You should also be
  158. able to run ORACLE version 6 and version 7 tools and applications written
  159. for Windows. All of these can run over SQL*Net for Windows DLLs.
  160.  
  161. NOTE:  Due to differences in memory use, this configuration may not allow
  162. you to run ORACLE MS-DOS-only tools or applications.
  163.  
  164. If ORACLE Server is not installed on your system
  165. ------------------------------------------------
  166.  
  167. To set up the ODBC ORACLE driver and the SQL*Net for Windows DLLs if you do
  168. not have any versions of ORACLE Server on your system:
  169.  
  170. 1.  Make sure that you have the correct versions of ORACLE products,
  171.     including at least one SQL*Net protocol.
  172.  
  173.     Product                                  Version
  174.     --------------------------------         -----------
  175.     ORACLE Installer                         3.0.8.3.7
  176.     Required Support Files                   7.0.12.1.0
  177.     SQL*Net Named Pipes for Windows          1.1.1.3
  178.     SQL*Net SPX for Windows                  1.1.1.5
  179.     SQL*Net TCP/IP for Windows               1.1.7.6
  180.  
  181. 2.  Install the network software connecting your client workstation to the
  182.     server and check that a connection can be made. For example, for the
  183.     TCP/IP protocol, type "ping <servername>". This connection must work
  184.     before you install the SQL*Net for Windows DLLs.
  185.  
  186. 3.  Run the ORACLE Installer program. When asked for your ORACLE
  187.     installation directory, use the suggested default directory C:\ORAWIN.
  188.  
  189. 4.  Run the ORACLE Installer in the ORACLE group in the Program Manager:
  190.  
  191.     a) Install the files from the Required Support Files disk.
  192.  
  193.     b) Install the SQL*Net protocol you will be using. For more
  194.        information, see the ORACLE documentation.
  195.  
  196. 5.  Add the following line to your AUTOEXEC.BAT file:
  197.  
  198.       SET CONFIG_FILES=C:\WINDOWS\ORACLE.INI
  199.  
  200.     NOTE: If you are using MS-DOS 6.0, add the following line to the end
  201.     of your AUTOEXEC.BAT file:
  202.  
  203.       SET CONFIG=
  204.  
  205.     ORACLE Server first checks the CONFIG environment variable for the path
  206.     of the ORACLE configuration file. If the CONFIG variable is not set,
  207.     ORACLE Server checks the CONFIG_FILES variable. Because MS-DOS 6.0 can
  208.     use the CONFIG environment variable during system startup, you must
  209.     clear this variable before leaving your AUTOEXEC.BAT file. Otherwise,
  210.     ORACLE Server will use its value as the path of the ORACLE
  211.     configuration file.
  212.  
  213. 6.  Make sure your PATH variable includes the C:\ORAWIN\BIN directory. To
  214.     do this, add the following line to your AUTOEXEC.BAT file:
  215.  
  216.       SET PATH=%PATH%;C:\ORAWIN\BIN
  217.  
  218. 7.  So that the ODBC ORACLE driver can use ORACLE version 7 error messages,
  219.     copy the version 7 error messages to the directory where the ODBC
  220.     ORACLE driver searches for error messages:
  221.  
  222.       COPY C:\ORAWIN\RDBMS70\*.MSB C:\ORAWIN\DBS
  223.  
  224. 8.  Search for and delete all copies of ORA6WIN.DLL from your system. A new
  225.     (backwards compatible) version of ORA6WIN.DLL will be installed with
  226.     the ODBC ORACLE driver.
  227.  
  228. 9.  If it is not already running, start Windows. Insert the ODBC Setup disk
  229.     in drive A, choose Run from the Windows Program Manager (or File
  230.     Manager) File menu, and then type "a:\setup.exe" in the Command Line
  231.     box. For information about using the ODBC setup program, see the online
  232.     Help.
  233.  
  234. 10. Run the ODBC Control Panel option and add a data source for your ORACLE
  235.     server. For information about using the ODBC Control Panel option, see
  236.     the online Help.
  237.  
  238. You should now be able to run the ODBC ORACLE driver.
  239.  
  240. ORACLE Error Messages
  241. ---------------------
  242.  
  243. The following section explains what to do when you encounter various error
  244. messages from ORACLE Server through the ODBC ORACLE driver.
  245.  
  246. ORA-xxxxx Message not found; product = RDBMS facility = ORA language = NULL
  247. ---------------------------------------------------------------------------
  248.  
  249. The ODBC ORACLE driver searches for error messages in the subdirectory that
  250. normally contains the ORACLE version 6 error messages. If you receive this
  251. error, it means that the ODBC ORACLE driver cannot find the error messages.
  252. To fix this:
  253.  
  254. 1.  Check that the CONFIG_FILES variable is set in your AUTOEXEC.BAT file
  255.     and that it points to your ORACLE configuration file (ORACLE.INI). If
  256.     you are using MS-DOS 6.0, check that the CONFIG environment variable is
  257.     either not set or is cleared in the last line of your AUTOEXEC.BAT
  258.     file.
  259.  
  260. 2.  Check that the ORACLE_HOME variable is set correctly in your
  261.     C:\WINDOWS\ORACLE.INI file.
  262.  
  263.     If ORACLE Server version 6 was already installed on your system,
  264.     ORACLE_HOME should be set twice. The first time, it should be set to
  265.     your version 6 <oraclehome> directory, usually C:\ORACLE6. The second
  266.     time, in the [Oracle] section of the file, it should be set to
  267.     C:\ORAWIN.
  268.  
  269.     If ORACLE Server was not installed on your system, ORACLE_HOME should
  270.     be set to C:\ORAWIN.
  271.  
  272. 3.  If you did not have any ORACLE software on your workstation, make sure
  273.     that you copied all the .MSB files from C:\ORAWIN\RDBMS70 to
  274.     C:\ORAWIN\DBS.
  275.  
  276. The ODBC ORACLE driver should now be able to print the ORACLE Server error
  277. message, enabling you to fix the problem that generated the error.
  278.  
  279. ORA-03121  No interface driver connected -- function not performed
  280. ------------------------------------------------------------------
  281.  
  282. The ODBC ORACLE driver cannot find ORA6WIN.DLL or one of the SQL*Net
  283. components. Check the following:
  284.  
  285. 1.  Without running the ODBC ORACLE driver, make sure the network
  286.     connection is valid. For example, type "ping <servername>" for a TCP/IP
  287.     connection.
  288.  
  289. 2.  Search for and delete old versions of ORA6WIN.DLL. The correct version
  290.     of the ORA6WIN.DLL was installed by the ODBC ORACLE driver in the
  291.     SYSTEM subdirectory of your Windows directory.
  292.  
  293. 3.  Check that the PATH variable contains the BIN subdirectory of the
  294.     <oraclehome> directory (usually C:\ORACLE6\BIN or C:\ORAWIN\BIN).
  295.  
  296. 4.  Check that the CONFIG_FILES variable is set in your AUTOEXEC.BAT file
  297.     and that it points to your ORACLE configuration file (ORACLE.INI). If
  298.     you are using MS-DOS 6.0, check that the CONFIG environment variable
  299.     is either not set or is cleared in the last line of your AUTOEXEC.BAT
  300.     file.
  301.  
  302. 5.  Check that SQLTCP.DLL (for TCP/IP), SQLSPX.DLL (for Novell NetWare
  303.     IPX/SPX), or SQLNMP.DLL (for Named Pipes) is in the ORACLE BIN
  304.     directory specified in the PATH variable. (If not, SQL*Net was not
  305.     installed correctly.)
  306.  
  307. 6.  Check that ORA7WIN.DLL and COREWIN.DLL are in the ORACLE BIN directory
  308.     specified in the PATH variable. (If not, SQL*Net was not installed
  309.     correctly.)
  310.  
  311. ORA-06120  NETTCP: network driver not loaded
  312. --------------------------------------------
  313.  
  314. This error can occur when ORA6WIN.DLL is loaded but cannot find another
  315. SQL*Net component, such as SQLTCP.DLL.
  316.  
  317. 1.  Check that the directories containing the SQL*Net components are in
  318.     your PATH variable.
  319.  
  320. 2.  Check that the ORACLE_HOME variable is set correctly in your
  321.     C:\WINDOWS\ORACLE.INI file.
  322.  
  323.     If ORACLE Server version 6 was already installed on your system,
  324.     ORACLE_HOME should be set twice. The first time, it should be set to
  325.     your version 6 <oraclehome> directory, usually C:\ORACLE6. The second
  326.     time, in the [Oracle] section of the file, it should be set to
  327.     C:\ORAWIN.
  328.  
  329.     If ORACLE Server was not installed on your system, ORACLE_HOME should
  330.     be set to C:\ORAWIN.
  331.  
  332. 3.  Search for and delete old versions of ORA6WIN.DLL. The correct version
  333.     of the ORA6WIN.DLL was installed by the ODBC ORACLE driver in the
  334.     SYSTEM subdirectory of your Windows directory.
  335.  
  336. 4.  Check that you have followed all the instructions for the SQL*Net
  337.     driver you are using. For example, for the SQL*Net for TCP/IP driver,
  338.     make sure that all the TSRs, such as NMTSR and SOCKTSR, are loaded.
  339.     (If not, SQL*Net was not installed correctly.)
  340.  
  341. ODBC Error Messages
  342. -------------------
  343.  
  344. The following section explains what to do when you encounter various ODBC
  345. error messages.
  346.  
  347. IM003 Driver specified by data source could not be loaded
  348. -----------------------------------------------------------
  349.  
  350. The ODBC Driver Manager is attempting to load the ODBC ORACLE driver
  351. (SQORA.DLL). SQORA.DLL loads ORA6WIN.DLL to connect to the ORACLE server.
  352. You can receive this message if it cannot find ORA6WIN.DLL or finds the
  353. wrong version of ORA6WIN.DLL.
  354.  
  355. 1.  Search for and delete old versions of ORA6WIN.DLL. The correct version
  356.     of the ORA6WIN.DLL was installed by the ODBC ORACLE driver in the
  357.     SYSTEM subdirectory of your Windows directory.
  358.  
  359. 2.  Make sure that ORA6WIN.DLL was installed when the ODBC ORACLE driver
  360.     was installed.
  361.  
  362.